package com.shuai.robot.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

@Component
public class ConfigContext {

    private static Environment env;

    @Autowired
    public ConfigContext(Environment env) {
        ConfigContext.env = env;
    }

    public static String getConfigValue(String key) {
        return env.getProperty(key);
    }
}
